package com.jz.pay.controller.impl;

import com.jz.commom.api.dto.request.Payment;
import com.jz.commom.api.dto.response.CommonResult;
import com.jz.pay.controller.PaymentServiceCtl;
import com.jz.pay.service.PaymentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.transaction.annotation.Transactional;
//import org.apache.dubbo.config.annotation.DubboService;

import javax.annotation.Resource;

@Slf4j
//@DubboService(version = "1.0.0",group = "test1")
public class PaymentServiceCtlImpl implements PaymentServiceCtl {
    @Resource
    private PaymentService paymentService;
    @Override
    public CommonResult createNew(Payment payment) {
        int result = paymentService.createNew(payment);
        log.info("*** 插入结果："+result);
        if(result>0){
            return CommonResult.success("ok","");
        }else{
            return CommonResult.fail("插入失败","");
        }
    }

}
